home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / BlitzBasic / GMODPlay1 / gmodplay / LookUp < prev   
Encoding:
Text File  |  1998-06-24  |  5.2 KB  |  159 lines

  1.  
  2. WARNING:Registers D0, D1, A0, A2 and A3 will get trashed!
  3.         Make sure nothing special is in them!
  4.  
  5. -----------------------------------------------------------------------------
  6.  
  7. Function:        GMInit
  8. Syntax:          longword.l=GMInit {Address.l,LengthOfFile.l}
  9.  
  10. Address.l = address of GMOD file (chip RAM)
  11. LengthOfFile.l = length of loaded GMOD file
  12.  
  13. This routine checks for the GMOD header, relocates the module if nessecary
  14. and returns the address of the GMOD.
  15.  
  16. longword.l can have three results:
  17. 1) False - Either the file was not a GMOD or could not be relocated
  18. 2) Same as Address.l - Fine, module not relocated
  19. 3) New number - Fine, module relocated, this MUST be kept as the new
  20.                 Address.l!
  21.  
  22. -----------------------------------------------------------------------------
  23.  
  24. Function:        GMCreatorID
  25. Syntax:          string$=GMCreatorID {Address.l}
  26.  
  27. Address.l = address of GMOD file (chip RAM)
  28.  
  29. This function returns the next four bytes after the header in string$.
  30.  
  31. Generally used by the program that created the GMOD.
  32.  
  33. -----------------------------------------------------------------------------
  34.  
  35. Function:        GMInitMusic
  36. Syntax:          string$=GMInitMusic {Address.l}
  37.  
  38. Address.l = address of GMOD file (chip RAM)
  39.  
  40. This routine first passes the noteplayer (see Bryan Fords' noteplayer
  41. standard, included in this archive) address to the GMOD.  It then jumps to
  42. the MODs' initmusic routine.
  43.  
  44. If everything went OK, then "" will be returned in string$, otherwise the
  45. GMODs' error string will be returned.
  46.  
  47. -----------------------------------------------------------------------------
  48.  
  49. Statement:       GMStartMusic
  50. Syntax:          GMStartMusic Address.l
  51.  
  52. Address.l = address of GMOD file (chip RAM)
  53.  
  54. This routine jumps to the MODs' startmusic routine.
  55.  
  56. -----------------------------------------------------------------------------
  57.  
  58. Statement:       GMStopMusic
  59. Syntax:          GMStopMusic Address.l
  60.  
  61. Address.l = address of GMOD file (chip RAM)
  62.  
  63. This routine, yep, you guessed it, jumps to the MODs' stopmusic routine.
  64.  
  65. -----------------------------------------------------------------------------
  66.  
  67. Statement:       GMEndMusic
  68. Syntax:          GMEndMusic Address.l
  69.  
  70. Address.l = address of GMOD file (chip RAM)
  71.  
  72. This routine jumps to the MODs' endmusic routine.
  73.  
  74. My brain is straining from RSI.  :)
  75.  
  76. -----------------------------------------------------------------------------
  77.  
  78. Function:        GMTimerModes
  79. Syntax:          byte.b=GMTimerModes {Address.l}
  80.  
  81. Address.l = address of GMOD file (chip RAM)
  82.  
  83. This routine checks which timing routines are present.
  84.  
  85. It can return byte.b as:
  86. 0 - No timing systems present (I don't ever expect that to happen)
  87. 1 - PAL timing (VBlank50) present
  88. 2 - NTSC timing (VBlank60) present
  89. 3 - TimerTick timing present
  90. If more than one timing system is found the values will be added together.
  91. (seperable with a `byte AND 2' or `byte AND 1' or whatever)
  92.  
  93. It should be noted here that since the jumptable of each GMOD can differ in
  94. length, some clown may create some sort of test mod, (with a short jumptable)
  95. which may not include ANY timing routines.  In that case this function still
  96. checks at the offsets, which may well contain module data instead.
  97.  
  98. It's unlikely, but you might want to take it into consideration (The actual
  99. player routines [VBlank50, VBlank60 and TimerTick] can tell you if these
  100. routines actually exist, but if they do exist, the routines will be executed,
  101. which may prove fatal if StartMusic hasn't been run.)
  102.  
  103. Again as I said, it's highly unlikely, but it's something to worry about :)
  104.  
  105. -----------------------------------------------------------------------------
  106.  
  107. Function:       GMVblank50
  108. Syntax:         byte.b=GMVblank50 {Address.l}
  109.  
  110. Address.l = address of GMOD file (chip RAM)
  111.  
  112. This jumps to the MODs' vblank50 routine and returns True in byte.b.
  113.  
  114. Note that this routine first checks if the jumptable is long enough to hold
  115. the vblank50 jmp and returns False if it doesn't.
  116.  
  117. -----------------------------------------------------------------------------
  118.  
  119. Function:       GMVblank60
  120. Syntax:         byte.b=GMVblank60 {Address.l}
  121.  
  122. Address.l = address of GMOD file (chip RAM)
  123.  
  124. This jumps to the MODs' vblank60 routine and returns True in byte.b.
  125.  
  126. Note that this routine first checks if the jumptable is long enough to hold
  127. the vblank60 jmp and returns False if it doesn't.
  128.  
  129. -----------------------------------------------------------------------------
  130.  
  131. Function:       GMGetSongName
  132. Syntax:         string$=GMGetSongName {Address.l}
  133.  
  134. Address.l = address of GMOD file (chip RAM)
  135.  
  136. This returns "" in string$ for failure, or the name of the song for success.
  137.  
  138. -----------------------------------------------------------------------------
  139.  
  140. Function:       GMGetSongAuthor
  141. Syntax:         string$=GMGetSongAuthor {Address.l}
  142.  
  143. Address.l = address of GMOD file (chip RAM)
  144.  
  145. This returns "" in string$ for failure, or the name of the author for
  146. success.
  147.  
  148. -----------------------------------------------------------------------------
  149.  
  150. Function:       GMGetMakerName
  151. Syntax:         string$=GMGetMakerName {Address.l}
  152.  
  153. Address.l = address of GMOD file (chip RAM)
  154.  
  155. This returns "" in string$ for failure, or the name of the program that
  156. created the module.
  157.  
  158. -----------------------------------------------------------------------------
  159.